﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;

namespace WebApplication3
{
    /// <summary>
    /// HTSAPServer的摘要说明
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    // 若要允许使用 ASP.NET AJAX 从脚本中调用此 Web 服务，请取消注释以下行。 
    // [System.Web.Script.Services.ScriptService]
    public class HTSAPServer : System.Web.Services.WebService
    {

        [WebMethod]
        public string login(string lpszDeviceId, string strDeviceKey)
        {
            return "0000^123456";
        }

        [WebMethod]
        public string logout(string sid)
        {
            return "0000";
        }

        [WebMethod]
        public string NSyncWriteVioInfo(VioInfo model)
        {
            Console.WriteLine(
                model.sid + "," +
                model.strDeviceId + "," +
                model.strVehicleId + "," +
                model.strDeviceType + "," +
                model.strDirectionId + "," +
                model.strDriveWayId + "," +
                model.strLicense + "," +
                model.strLicenseType + "," +
                model.strPassDateTime + "," +
                model.strRedLightBeginTime + "," +
                model.strRedLightLast + "," +
                model.lSpeed + "," +
                model.lLargeLimitSpeed + "," +
                model.lMiniLimitSpeed + "," +
                model.strViolationType + "," +
                model.strViolationType2 + "," +
                model.lCarLength + "," +
                model.strLicenseColor + "," +
                model.strCarType + "," +
                model.strPicLocalPath1 + "," +
                model.strPicLocalPath2 + "," +
                model.strPicLocalPath3 + "," +
                model.strPicLocalPath4 + "," +
                model.strPicLocalPath5 + "," +
                model.strPicLocalPath6 + "," +
                model.strPicLocalPath7 + "," +
                model.strPicRemotePath + "," +
                model.strViolate + "," +
                model.strSendType + "," +
                model.strVioPlaceId + "," +
                model.strVioPlaceName + "," +
                model.strCollectDept + "," +
                model.strDataSrc + "," +
                model.lRoadKLMS + "," +
                model.lRoadMs + "," +
                model.strCarColor + "," +
                model.strPassDateTime2 + "," +
                model.strVioPlaceId2 + "," +
                model.strVioPlaceName2 + "," +
                model.strReserve1 + "," +
                model.strReserve2 + "," +
                model.strReserve3);
            return "0000^执行成功";
        }
    }
}
